import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../components/page/HomeView.vue'
import AddView from '../views/car_manage/AddView.vue'
import CarView from '../views/car_manage/CarView.vue'
import CustomerView from '../views/customer_manage/CustomerView.vue'
import ManageView from '../views/customer_manage/ManageView.vue'
import DriverView from '../views/driver_manage/DriverView.vue'
import RegisterView from '../views/driver_manage/RegisterView.vue'
import IndexView from '../views/home/IndexView.vue'
import AgreementView from '../views/new_build/AgreementView.vue'
import EnterView from '../views/new_build/EnterView.vue'
import OrderView from '../views/order_manage/OrderView.vue'
import LoginView from '../views/login/LoginView.vue'
import ReceiptView from '../views/order_manage/ReceiptView.vue'
import ExceptionView from '../views/exception/ExceptionView.vue'
import ApproveView from '../views/money/ApproveView.vue'
import StreamView from '../views/money/StreamView.vue'
Vue.use(VueRouter)

const routes = [
    {
        path:"/",
        name:"login",
        component:LoginView
    },
    {
        path:"/home",
        name:"home",
        component:HomeView,
        children:[
            {
                path:"/index",
                name:"index",
                component:IndexView
            },
            {
                path:"/add",
                name:"add",
                component:AddView
            },
            {
                path:"/car",
                name:"car",
                component:CarView
            },
            {
                path:"/customer",
                name:"customer",
                component:CustomerView
            },
            {
                path:"/manage",
                name:"manage",
                component:ManageView
            },
            {
                path:"/driver",
                name:"driver",
                component:DriverView
            },
            {
                path:"/register",
                name:"register",
                component:RegisterView
            },
            {
                path:"/agreement",
                name:"agreement",
                component:AgreementView
            },
            {
                path:"/enter",
                name:"enter",
                component:EnterView
            },
            {
                path:"/order",
                name:"order",
                component:OrderView
            },
            {
                path:"/receipt",
                name:"receipt",
                component:ReceiptView
            },
            {
                path:"/exception",
                name:"exception",
                component:ExceptionView
            },
            {
                path:"/approve",
                name:"approve",
                component:ApproveView
            },
            {
                path:"/stream",
                name:"stream",
                component:StreamView
            }
        ]
    }
]

const router = new VueRouter({
  routes
})

export default router
